import request from '@/utils/request'
//获取子评论
export function getSonCommentList(id, page, limit) {
  return request({
    method: 'GET',
    url: `/commentservice/comment-son/getSonCommentListByTokenAndPpCommentIdOrderByCreatTime/${id}/${page}/${limit}`,
  }).then(res => res.data)
}

//新增子评论
export function addSonComment(data) {
  return request({
    method: 'POST',
    url: `/commentservice/comment-son/addSonCommentByCommentFormVoAndToken`,
    data
  }).then(res => res.data)
}

// 删除父评论请求
export function deleteParentCommentById(id) {
  return request({
    method: 'DELETE',
    url: `/commentservice/comment-parent/deleteParentCommentById/${id}`,
  }).then(res => res.data)
}

// 删除子评论请求
export function deleteSonCommentById(id) {
  return request({
    method: 'DELETE',
    url: `/commentservice/comment-son/deleteSonCommentById/${id}`,
  }).then(res => res.data)
}

